import config from 'config'
import httpFetch from 'share/httpFetch'
import errorMessage from 'share/errorMessage'

export default {
  //开票信息 新增/修改
  addInvoiceTitle(params, isNew) {
    let method = isNew ? 'post' : 'put';
    return httpFetch[method](`${config.baseUrl}/api/operation/invoice/info/header`, params).catch(e => {
      errorMessage(e.response);
    })
  },

  //获取开票信息 list
  getInvoiceTile(params) {
    return httpFetch.get(`${config.baseUrl}/api/operation/invoice/info/header/page`, params)
  }

}
